<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</h:head>
<h:body>

	<div style="width:100%;font-size:36px;line-height:48px;background-color:navy;color:white">H6 EDUCACIONAL</div>
	<div id="heading">
		<ui:insert name="heading">
			<ui:include src="templates/menu.xhtml"/>
		</ui:insert>
	</div>

	<h:form>
	
		<p:inputText id="palavraChave" value="#{manterAlunoListManager.nomePesq}" />
		<p:commandButton value="Pesquisar" update="tabela" action="#{manterAlunoListManager.iniciarTabela()}" style="margin:0"/>
		
		<p:dataTable id="tabela" var="alunos" value="#{manterAlunoListManager.alunos}" 
		selection="#{manterAlunoListManager.alunoSelec}" selectionMode="single" readonly="true"
		rowKey="#{alunos.id}" emptyMessage="Nenhum dado encontrado" >  
	        <p:column headerText="ID">  
	            <h:outputText value="#{alunos.id}" />  
	        </p:column>
	        <p:column headerText="Nome">
	            <h:outputText value="#{alunos.nome}" />  
	        </p:column>  
	        <p:column headerText="Data Nascimento">  
	            <p:calendar value="#{alunos.dataNascimento}" pattern="dd/MM/yy" readonly="true" showOn="none" />  
	        </p:column>  
    	</p:dataTable> 
		
		<p:commandButton value="Cadastro" action="#{manterAlunoListManager.cadastrar()}" icon="ui-icon-check" style="margin:0"/>
		<p:commandButton value="Editar" action="#{manterAlunoListManager.editar()}" icon="ui-icon-pencil" style="margin:0"/>
		<p:commandButton value="Remover" action="#{manterAlunoListManager.remover()}" update="tabela" 
		icon="ui-icon-close" style="margin:0"/>
		
	</h:form>
</h:body>
</html>